package com.babble.manage.feign;

import com.babble.manage.entity.Img;
import com.babble.manage.feign.fallback.ImgClientFallback;
import org.springblade.common.constant.CommonConstant;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 图片服务远程接口
 *
 * @author wm
 */
@FeignClient(
	value = CommonConstant.BABBLE_MANAGE_NAME,
	fallback = ImgClientFallback.class
)
public interface IImgClient {
	String API_PREFIX = "/babble/img-feign";

	/**
	 * 根据图片id查询图片信息
	 *
	 * @param id
	 * @return
	 */
	@GetMapping(API_PREFIX + "/get/{id}")
	R<Img> getImg(@PathVariable("id") String id);
}
